<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="app" uri="http://www.wanrenhui.com" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
	  <%@include file="/res/include/base-head.jsp"%>
	  <%@include file="/res/include/jquery-easyui.jsp"%>
	<script type="text/javascript" src="${pageContext.request.contextPath}/res/js/user/userBase.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath}/res/js/area.js"></script>
  </head>
  <body>
	<div class="easyui-layout" data-options="fit:true">
		<div data-options="region:'north',border:false,split:false">
	    	<form id="query-form" class="search_form clearfix">
	            <dl>
					<dt>省：</dt>
					 <dd>
	                	<select name="provinceId" id="provinceId" onchange="admin.area.changeProvince()" class="txt grid-8">
	                		<c:forEach var="province" items="${provinceList}">  
                                <option value="${province.id}">${province.name}</option>  
                            </c:forEach>
	                	</select>
	                </dd>
				</dl>
				<dl>
					<dt>市：</dt>
					 <dd>
	                	<select name="cityId" id="cityId" onchange="admin.area.changeCity()" class="txt grid-8">
	                		<option value="">--请选择--</option>
	                	</select>
	                </dd>
				</dl>
				<dl>
					<dt>区：</dt>
					 <dd>
	                	<select name="areaId" id="areaId" onchange="admin.area.changeArea()" class="txt grid-8">
	                		<option value="">--请选择--</option>
	                	</select>
	                </dd>
				</dl>
				<dl>
					<dt>社区：</dt>
					<dd>
						<select name="communityId" id="communityId" class="txt grid-8">
	                		<option value="">--请选择--</option>
	                	</select>
					</dd>
				</dl>
				<p class="cl"></p>
	            <dl>
					<dt>真实姓名：</dt>
					<dd>
						<input name="realName" id="realName" type="text" class="txt" maxlength="16"/>
					</dd>
				</dl>
				<dl>
					<dt>身份证号码：</dt>
					<dd>
						<input name="identityNumber" id="identityNumber" type="text" class="txt" maxlength="32"/>
					</dd>
				</dl>
				<dl>
					<dt>审核状态：</dt>
					<dd>
						<select name="auditStatus" class="txt grid-8">
							<option value="">请选择</option>
							<option value="1">待审核</option>
							<option value="2">通过</option>
							<option value="3">不通过</option>
						</select>
					</dd>
				</dl>
	            <p class="search_form_btn">
	            	<input type="button" value="搜索" class="icon_serach" onclick="admin.userBase.query()" />
	            </p>
	        </form>
	  	</div>
	    <div data-options="region:'center',border:false">
		    <table id="datagrid" data-options="url:'${pageContext.request.contextPath}/user/auth/list',toolbar:'#toolbar'">
				<thead>
					<tr>
						<th data-options="field:'nick',width:100,align:'center'">昵称</th>
						<th data-options="field:'realName',width:100,align:'center' ">真实姓名</th>
						<th data-options="field:'communityName',width:100,align:'center' ">所属社区</th>
						<th data-options="field:'identityNumber',width:200,align:'center' ">身份证号码</th>
						<th data-options="field:'auditStatus',width:80,align:'center',formatter:formatAuditStatus ">审核状态</th>
						<th data-options="field:'strNewAt',width:120,align:'center' ">申请时间</th>
			            <th data-options="field:'id',align:'center',width:150,formatter:formatOperation">操作</th>
					</tr>
				</thead>
			</table>
	  	</div>
	</div>

	<script>
	function formatAuditStatus(value,row,index) {
		var l_html = '待审核';
		if (value==2) {
			l_html = '通过';
		} else if (value==3) {
			l_html = '不通过';
		}
		return l_html;
	}
	function formatOperation(value,row,index) {
		var l_html = '<a href="javascript:;" class="table_link" onclick="admin.userBase.auth('+row.userId+')">身份认证</a>';
		return l_html;
	}
	</script>
  </body>
</html>
